<?php /* Smarty version Smarty-3.1.12, created on 2013-06-09 10:07:04
         compiled from "D:\mxx\sys-admin\template\auth\admin_list.htm" */ ?>
<?php /*%%SmartyHeaderCode:1291851b3e3483ce709-14922510%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '637b85cf6abeaf1c0b55143a07fd76d57fa5fbcb' => 
    array (
      0 => 'D:\\mxx\\sys-admin\\template\\auth\\admin_list.htm',
      1 => 1365247718,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1291851b3e3483ce709-14922510',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'roles' => 0,
    'role' => 0,
    'sh' => 0,
    'sortfield' => 0,
    'sortval' => 0,
    'users' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_51b3e34862f636_20149881',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_51b3e34862f636_20149881')) {function content_51b3e34862f636_20149881($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include 'D:\\mxx\\includes\\smarty\\plugins\\modifier.date_format.php';
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>ECSHOP 管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="/sys-admin/css/general.css" rel="stylesheet" type="text/css">
<link href="/sys-admin/css/main.css" rel="stylesheet" type="text/css">
<script src="/sys-admin/js/jquery.js" type="text/javascript"></script>
<script src="/sys-admin/js/list.js" type="text/javascript"></script>
</head>
<body>
<h1>
<span class="action-span"><a href="/sys-admin/action/auth/admin.php?met=addui">添加管理员</a></span>
<span class="action-span1">管理员管理</span>
</h1>
<!-- 商品搜索 -->
<div class="form-div">
    <select list="search" ltype='1' lfield="role_id">
     <option selected="selected" value="">所有角色</option>
     <?php  $_smarty_tpl->tpl_vars['role'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['role']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['roles']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['role']->key => $_smarty_tpl->tpl_vars['role']->value){
$_smarty_tpl->tpl_vars['role']->_loop = true;
?> 
		<option value="<?php echo $_smarty_tpl->tpl_vars['role']->value[2];?>
" <?php if ($_smarty_tpl->tpl_vars['sh']->value['role_id']['v']==$_smarty_tpl->tpl_vars['role']->value[2]){?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['role']->value[0];?>
</option>
	 <?php } ?> 
    </select>
    <select list="search" ltype='1' lfield="is_active">
    <option selected="selected" value="">状态</option>
    <option value="1" <?php if ($_smarty_tpl->tpl_vars['sh']->value['is_active']['v']=='1'){?>selected="selected"<?php }?>>可用</option>
    <option value="0" <?php if ($_smarty_tpl->tpl_vars['sh']->value['is_active']['v']=='0'){?>selected="selected"<?php }?>>停用</option>
    </select>
    <span>用户名</span><input size="15" value="<?php echo $_smarty_tpl->tpl_vars['sh']->value['username']['v'];?>
" type="text" list="search" ltype='2' lfield="username">
    <input value="搜索 " class="button" type="button" onclick="to_html();">
</div>
<input id="sort_field" value="<?php echo $_smarty_tpl->tpl_vars['sortfield']->value;?>
" type="hidden">
<input id="sort_val" value="<?php echo $_smarty_tpl->tpl_vars['sortval']->value;?>
" type="hidden">


<div class="list-div" id="listDiv">
<table cellpadding="3" cellspacing="1">
  <tbody><tr>
    <th class="chks">
      <input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox">
    </th>
    <th class="num">#</th>
    <th>用户名</th>
    <th>姓名</th>
    <th>电话</th>
    <th>邮箱</th>
    <th>状态</th>
    <th>所属角色</th>
    <th><a href="javascript:void(0);" name="sort" field="created">创建时间</a>
    <?php if ($_smarty_tpl->tpl_vars['sortfield']->value=='created'){?><?php if ($_smarty_tpl->tpl_vars['sortval']->value==1){?><span class="sort_asc"></span><?php }else{ ?><span class="sort_desc"></span><?php }?><?php }?></th>
    <th><a href="javascript:void(0);" name="sort" field="logdate">最后登录时间</a>
    <?php if ($_smarty_tpl->tpl_vars['sortfield']->value=='logdate'){?><?php if ($_smarty_tpl->tpl_vars['sortval']->value==1){?><span class="sort_asc"></span><?php }else{ ?><span class="sort_desc"></span><?php }?><?php }?></th>
    <th>操作</th>
  </tr>
  <?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['user'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['user']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['user']['name'] = 'user';
$_smarty_tpl->tpl_vars['smarty']->value['section']['user']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['users']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['user']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['user']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['user']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['user']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['user']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['user']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['user']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['user']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['user']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['user']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['user']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['user']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['user']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['user']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['user']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['user']['total']);
?> 
	  <tr class="share">
	    <td><input name="checkboxes[]" value="1" type="checkbox"></td>
	  	<td class="num"><?php echo $_smarty_tpl->getVariable('smarty')->value['section']['user']['index']+1;?>
</td>  
	    <td><a href="#"><?php echo $_smarty_tpl->tpl_vars['users']->value[$_smarty_tpl->getVariable('smarty')->value['section']['user']['index']]['username'];?>
</a></td>  
	    <td><?php echo $_smarty_tpl->tpl_vars['users']->value[$_smarty_tpl->getVariable('smarty')->value['section']['user']['index']]['realname'];?>
</td>  
	    <td><?php echo $_smarty_tpl->tpl_vars['users']->value[$_smarty_tpl->getVariable('smarty')->value['section']['user']['index']]['phone'];?>
</td>  
	    <td><?php echo $_smarty_tpl->tpl_vars['users']->value[$_smarty_tpl->getVariable('smarty')->value['section']['user']['index']]['email'];?>
</td> 
	    <td><?php if ($_smarty_tpl->tpl_vars['users']->value[$_smarty_tpl->getVariable('smarty')->value['section']['user']['index']]['is_active']==1){?>可用<?php }else{ ?>停用<?php }?></td> 
	    <td><?php echo $_smarty_tpl->tpl_vars['users']->value[$_smarty_tpl->getVariable('smarty')->value['section']['user']['index']]['rolename'];?>
</td>  
	    <td><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['users']->value[$_smarty_tpl->getVariable('smarty')->value['section']['user']['index']]['created'],'%Y-%m-%d %H:%M:%S');?>
</td>  
	    <td><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['users']->value[$_smarty_tpl->getVariable('smarty')->value['section']['user']['index']]['logdate'],'%Y-%m-%d %H:%M:%S');?>
</td>  
	    <td>
	    <a href="/sys-admin/action/auth/admin.php?met=editui&id=<?php echo $_smarty_tpl->tpl_vars['users']->value[$_smarty_tpl->getVariable('smarty')->value['section']['user']['index']]['user_id'];?>
" class="oper_edit" title="编辑" ></a>
        <a href="javascript:delAdmin(<?php echo $_smarty_tpl->tpl_vars['users']->value[$_smarty_tpl->getVariable('smarty')->value['section']['user']['index']]['user_id'];?>
,'<?php echo $_smarty_tpl->tpl_vars['users']->value[$_smarty_tpl->getVariable('smarty')->value['section']['user']['index']]['username'];?>
');" class="oper_trash" title="删除" ></a>
		</td> 
	   </tr>
   <?php endfor; endif; ?>
  </tbody></table>
<!-- end goods list -->
<?php echo $_smarty_tpl->getSubTemplate ("../common/page.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
  
</div>
<script type="text/javascript">
var page_url = '/sys-admin/action/auth/admin.php?met=list';
function delAdmin(userId,name){
	if(confirm("您确定要删除'"+name+"'?")){
		$.get('/sys-admin/action/auth/admin.php?met=delete&id='+userId+'&t='+(new Date().getTime()),null,function(result){
			if($.trim(result) == "1"){
				alert("删除'"+name+"'成功");
				document.location.reload();
			}else{
				alert("删除'"+name+"'失败");
			}
		});
	}
}
</script>
</body></html><?php }} ?>